package me.zk.practice1.list;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.UUID;
import java.util.Vector;
import java.util.concurrent.CopyOnWriteArrayList;

/**
 * @Author: zhang kai
 * @Date: 2021/12/21
 * @Description:
 */
public class ArrayListDemo {
    public static void main(String[] args) {
        List<String> list = new CopyOnWriteArrayList<>();
        for (int i = 0; i < 20; i++) {
            new Thread(() -> {
                for (int j = 0; j < 100; j++) {
                    list.add(UUID.randomUUID().toString().substring(0,8));
                }
                System.out.println(list);
            }).start();
        }

        for (int i = 0; ; ) {
            System.out.println("12");
        }

    }
}
